<%@page import="net.kesumu.yushabuserver.ManipulateImage"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%
    String imgEncodedStr = request.getParameter("image");
String fileName = request.getParameter("filename");
System.out.println("Filename: "+ fileName);
if(imgEncodedStr != null){
	String relativeWebPath = "/photos";
	String absoluteDiskPath = getServletContext().getRealPath(relativeWebPath);
    ManipulateImage.convertStringtoImage(imgEncodedStr, fileName, absoluteDiskPath);
    System.out.println("Inside if");
    out.print("Image upload complete, Please check your directory");
} else{
    System.out.println("Inside else");
    out.print("Image is empty");    
}
%>